#ifndef MPU6050_H
#define MPU6050_H


#include "cmsis_os2.h"

#define MPU6050_ADDRESS 0x68   // 器件的I2C从机地址
#define MPU6050_I2C_IDX 1        // 模块的I2C总线号
#define MPU6050_I2C_SPEED 100000 // 100KHz
#define I2C_MASTER_ADDR 0x0
/* io */
#define I2C_SCL_MASTER_PIN 16
#define I2C_SDA_MASTER_PIN 15
#define CONFIG_PIN_MODE 2


uint32_t MPU6050_WiteByteData(uint8_t byte);
uint32_t MPU6050_RecvData(uint8_t *data, size_t size);
uint32_t MPU6050_WiteCmdByteData(uint8_t regAddr, uint8_t byte);
uint32_t MPU6050_ReadRegByteData(uint8_t regAddr, uint8_t *byte);

uint32_t MPU6050_Init(void);
void MPU6050_GetID(uint8_t *byte);
void MPU6050_GetData(int16_t *AccX, int16_t *AccY, int16_t *AccZ, 
						int16_t *GyroX, int16_t *GyroY, int16_t *GyroZ);




#endif